#!/usr/bin/env python

import os, sys

class LiweDocParser ( object ):
	def __init__ ( self ):
		self._in_class = False
		self._in_function = False

	def read_file ( self, fname ):
		for line in [ x.strip() for x in open ( fname, "r" ).readlines () ]:
			self._parse ( line )

	def _parse ( self, line ):
		if line.startswith ( "def " ):
			self._parse_func_name ( line )

	def _parse_func_name ( self, line ):
		func_name = line [ 4 : -1 ].strip ()
		print func_name

par = LiweDocParser ()
par.read_file ( sys.argv [ 1 ] )
